﻿using System;
using System.Collections.Generic;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities
{

	/// <summary>
	/// Represents a product recommendation for a single product by a single customer.
	/// </summary>
	/// <remarks>
	/// <para>
	/// Recommendations can be either positive (&quot;I recommend you buy this product.&quot;) or
	/// negative (&quot;I recommend you do <b>not</b> buy this product.&quot;).
	/// </para>
	/// </remarks>
	public class ProductRecommendation
	{

		#region Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="ProductRecommendation"/> class.
		/// </summary>
		public ProductRecommendation()
		{
			AttributeValues = new Dictionary<Guid, ProductRecommendationAttributeValue>();
		}

		#endregion // Constructors

		#region Properties

		/// <summary>
		/// Gets or sets the product feedback identifier of the product feedback that the 
		/// recommendation is a part of.
		/// </summary>
		/// <value>A product feedback identifier <see cref="Guid"/>.</value>
		public Guid FeedbackId { get; set; }

		/// <summary>
		/// Gets or sets the product recommendation value.
		/// </summary>
		/// <value><see langword="true"/> if the recommendation is positive, <see langword="false"/>
		/// if the recommendation is negative.</value>
		public bool Value { get; set; }

        /// <summary>
        /// Gets the attribute values of the recommendation.
        /// </summary>
        /// <value>A <see cref="Dictionary{TKey,TValue}"/> of <see cref="ProductRecommendationAttributeValue"/>
        /// keyed by attribute identifier <see cref="Guid"/>.</value>
        public Dictionary<Guid, ProductRecommendationAttributeValue> AttributeValues { get; private set; }

        #endregion // Properties

	}

}
